/**
 * @author: gao
 * @create-date: 2025/3/1 19:01
 */

public class Test {
    public static void PrintTreeNode(TreeNode root){
        if(root == null){
            return;
        }
        System.out.print(root.val+" ");
        PrintTreeNode(root.left);
        PrintTreeNode(root.right);
    }

    public static void main(String[] args) {
        Solution soluion = new Solution();

        int[] preOrder = new int[]{3,9,20,15,7};
        int[] inOrder = new int[]{9,3,15,20,7};

        TreeNode root = soluion.buildTree(preOrder,inOrder);
        PrintTreeNode(root);
    }
}
